{% extends "wagtailadmin/base.html" %}
{% load wagtailadmin_tags i18n %}
{% block titletag %}{% trans 'Search' %}{% endblock %}
{% block extra_js %}
    {{ block.super }}

    <script>
        window.headerSearch = {
            url: "{% url 'wagtailadmin_pages:search' %}",
            termInput: "#id_q",
            targetOutput: "#page-results"
        }
    </script>
    <script>
        window.wagtailConfig.BULK_ACTION_ITEM_TYPE = 'PAGE';
    </script>
    <script defer src="{% versioned_static 'wagtailadmin/js/bulk-actions.js' %}"></script>
{% endblock %}

{% block content %}
    {% trans "Search" as search_str %}
    {% include "wagtailadmin/shared/header.html" with title=search_str search_url="wagtailadmin_pages:search" icon="search" %}

    <div id="page-results">
        {% include "wagtailadmin/pages/search_results.html" %}
    </div>
    {% trans "Select all pages in listing" as select_all_text %}
    {% include 'wagtailadmin/bulk_actions/footer.html' with app_label='wagtailcore' model_name='page' objects=pages select_all_obj_text=select_all_text %}
{% endblock %}
